import React, {Component} from 'react';
import {View, Text, Button} from 'react-native';
import NavigationFactory from '@/navigator/NavigationFactory';
import Page1 from '@/test/Navigation/Page1';
import Page2 from '@/test/Navigation/Page2';
import Page3 from '@/test/Navigation/Page3';
import Page4 from '@/test/Navigation/Page4';
import Page5 from '@/test/Navigation/Page5';

@NavigationFactory
class HomePage extends Component {
  render() {
    //导航
    const {navigation} = this.props;
    return (
      <View>
        <Text>Friends: </Text>
        <Button
          onPress={() => navigation.navigate('Page1', {testRoute: '测试1'})}
          title="Go to Page1"
        />
        <Button
          title={'测试设置参数'}
          onPress={() => {
            navigation.setOptions({title: '测试首页参数'});
          }}
        />
      </View>
    );
  }
}

export default HomePage;
